#ifndef __M_NGINX_H
#define __M_NGINX_H

//发送接收缓冲区
#define M_NGINX_RX_BUFF_SIZE    4096
#define M_NGINX_TX_BUFF_SIZE    4096



enum HttpRequestMethod{
    GET,
    SET,
    DELETE
};


//    GET / HTTP/1.1
//    Host: 127.0.0.1:8888
//    Connection: keep-alive
//    Cache-Control: max-age=0
//    sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"
//    sec-ch-ua-mobile: ?0
//    sec-ch-ua-platform: "Windows"
//    Upgrade-Insecure-Requests: 1
//    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
//    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
//    Sec-Fetch-Site: cross-site
//    Sec-Fetch-Mode: navigate
//    Sec-Fetch-User: ?1
//    Sec-Fetch-Dest: document
//    Accept-Encoding: gzip, deflate, br, zstd
//    Accept-Language: zh-CN,zh;q=0.9

typedef struct {
    enum HttpRequestMethod method;
    char *url;

    char *host;
    char *get_param;
    char *post_param;
    //标头内容

    //主体
    char *content;
}HttpRequest;


typedef struct {

}HttpResponse;


typedef struct{
    char *url;
    void (*controller)();
    char *view;
}MNginxRouter;


typedef struct{
    void (*init)();
    void (*get)(char *param);
    void (*post)(char *param);
    void (*cookie)(char *param);
    void (*session)(char *param);
    void (*rul)();
    void (*response)();
    void (*redirect)(char *param);
    void (*view)(const char *  _format,...);
}MNginx;


#endif